Method and apparatus for processing video signal

ABSTRACT

The present invention relates to a method and apparatus for processing a video signal, which can increase the accuracy of the motion vector prediction through motion vector scaling which takes a difference in the temporal distance between reference pictures into consideration. To this end, the present invention provides a video signal processing method and a video signal processing apparatus using the same, and the method comprises the steps of: scaling at least one neighboring partition motion vector for a motion vector prediction of the current partition; scaling the neighboring partition motion vector, which has been selected, when the reference picture of the neighboring partition motion vector is different from the reference picture of the current partition; acquiring a motion vector prediction value of the current partition using the scaled motion vector; and acquiring a motion vector of the current partition using the motion vector prediction value.

TECHNICAL FIELD

The present invention relates to a method and apparatus for processing avideo signal and, more particularly, to a method and apparatus forencoding or decoding a video signal.

BACKGROUND ART

Compression coding is a signal processing technique of transmittingdigital information through a communication line or storing the digitalinformation in a form suitable for a storage medium. Audio, video andtext information may be a target of compression coding and,particularly, compression coding performed on the video information isreferred to as video compression. Video signal compression is performedby eliminating redundant information in consideration of spatialcorrelation, temporal correlation, stochastic correlation, etc. With thedevelopment of a variety of media and data transmission media, however,there is a need for a high efficiency video signal processing method andapparatus.

DISCLOSURE Technical Problem

To improve video compression efficiency, a method of predicting a motionvector of the current partition using a motion vector of a neighboringpartition may be used. In this case, the motion vector of theneighboring partition is used for prediction of the motion vector of thecurrent partition regardless of a difference between reference picturesof the current partition and the neighboring partition. This decreasesthe accuracy of motion vector prediction.

Furthermore, since a neighboring motion vector candidate group islimited to neighboring partitions having the same reference picture listand the same reference picture as those of the current partition, theprobability that an available neighboring motion vector can be acquireddecreases.

In addition, complexity of a process of selecting a neighboring motionvector to be used for motion vector prediction increases as the numberof candidates increase, and thus a method for efficiently perform theselection process is needed.

Technical Solution

To solve the above-described problems, an object of the presentinvention is to increase the accuracy of motion vector predictionthrough motion vector scaling which takes a temporal distance differencebetween reference pictures into consideration.

Another object of the present invention is to detect a neighboringmotion vector which refers to the same reference picture from differentreference picture lists and to use the detected neighboring motionvector for motion vector prediction.

Another object of the present invention is to extend a neighboringmotion vector candidate group for motion vector prediction.

Another object of the present invention is to provide efficient prioritysearch conditions for a process of selecting a neighboring partitionmotion vector to be included in a motion vector prediction candidategroup of the current partition.

Another object of the present invention is to unify motion informationprediction methods in all modes by applying a method of acquiring motioninformation of a neighboring partition, used in a merge mode, to anormal inter mode.

Advantageous Effects

According to a video signal processing apparatus of the presentinvention, it is possible to increase the accuracy of motion vectorprediction by scaling a motion vector of a neighboring partition inconsideration of a temporal distance difference between referencepictures and using the scaled neighboring partition motion vector forprediction of a motion vector of the current partition.

Furthermore, since neighboring motion vectors of various candidategroups are used in addition to neighboring motion vectors which refer tothe same reference picture in the same reference picture list, it ispossible to increase flexibility of motion vector prediction and toextend the range of selection of a neighboring motion vector foraccurate motion vector prediction.

In addition, a neighboring partition motion vector for motion vectorprediction of the current partition is searched for by appropriatelycombining motion vector prediction candidate group selection conditionsand partition position order counts, and thus search operationcomplexity can be reduced and an available neighboring motion vector canbe acquired.

Moreover, it is possible to decrease the complexity of acquisition ofneighboring partition motion information by unifying neighboringpartition motion information acquisition methods in a merge mode, a skipmode and an inter mode.

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram of a video signal encoder according to anembodiment of the present invention;

FIG. 2 is a block diagram of a video signal decoder according to anembodiment of the present invention;

FIG. 3 illustrates an example of segmenting a unit according to anembodiment of the present invention;

FIG. 4 illustrates a method of representing the segmentation structureof FIG. 3 in a hierarchical manner according to an embodiment of thepresent invention;

FIG. 5 illustrates various segmentation forms of a prediction unitaccording to embodiments of the present invention;

FIG. 6 illustrates exemplary spatial neighboring partitions of thecurrent partition;

FIGS. 7 and 8 illustrate methods of scaling a motion vector of aneighboring partition;

FIG. 9 illustrates an example of referring to the same reference picturefrom different reference picture lists;

FIGS. 10 and 11 show exemplary reference picture lists and referenceindex values of the current partition and spatial neighboringpartitions;

FIG. 12 is a block diagram of a motion estimator of the video signaldecoder according to an embodiment of the present invention;

FIGS. 13 and 14 show spatial neighboring partitions from which motionvectors to be included in a motion vector prediction candidate group ofthe current partition are selected according to embodiments of thepresent invention;

FIG. 15 shows neighboring partitions to be merged with the currentpartition in a merge mode; and

FIG. 16 is a flowchart illustrating motion vector prediction candidategroup selection conditions of the present invention.

BEST MODE FOR CARRYING OUT THE INVENTION

According to one aspect of the present invention, a video signalprocessing method includes: selecting at least one neighboring partitionmotion vector for motion vector prediction of the current partition;scaling the selected neighboring partition motion vector when areference picture of the neighboring partition motion vector isdifferent from a reference picture of the current partition; acquiring amotion vector prediction value of the current partition using the scaledmotion vector; and acquiring a motion vector of the current partitionusing the motion vector prediction value.

The scaled motion vector may be a motion vector linearly interpolatedusing a temporal distance between pictures.

The motion vector prediction candidate group may include motion vectorsrespectively selected from a first group including a bottom leftneighboring partition A_(m+1) of the current partition and the lowestpartition A_(m) among left neighboring partitions of the currentpartition, and a second group including a top right neighboringpartition B_(n+1) of the current partition, the rightmost partitionB_(n) among top neighboring partitions of the current partition, and atop left neighboring partition B⁻¹ of the current partition.

The selecting the neighboring partition motion vector may includerespectively selecting motion vectors from the first group and thesecond group on the basis of motion vector prediction candidate groupselection conditions with regard to a reference picture list, areference picture and information indicating an inter mode.

The motion vector prediction candidate group selection conditionssequentially determine; (a) whether a neighboring partition is an intermode partition having the same reference picture list and the samereference picture as those of the current partition, (b) whether aneighboring partition is an inter mode partition having a referencepicture list different from that of the current partition and the samereference picture as that of the current partition, (c) whether aneighboring partition is an inter mode partition having the samereference picture list as that of the current partition and a referencepicture different from that of the current partition, and (d) whether aneighboring partition is an inter mode partition.

Whether the neighboring partition is an inter mode partition having areference picture list different from that of the current partition andthe same reference picture as that of the current partition may bedetermined on the basis of a picture order count (POC) value.

The selecting the neighboring partition motion vector may includeperforming condition first search, which prioritizes the motion vectorprediction candidate group selection conditions higher than partitionposition order, on the partitions of the first or second group.

The selecting the neighboring partition motion vector may includeperforming partition position first search, which prioritizes partitionposition order higher than the motion vector prediction candidate groupselection conditions, on the partitions of the first or second group.

The selecting the neighboring partition motion vector may include:performing condition first search on the partitions of the first orsecond group for the motion vector prediction candidate group selectioncondition (a); and performing partition position first search for themotion vector prediction candidate group selection conditions (b), c)and (d) if an available neighboring partition motion vector is notsearched through the condition first search.

According to another aspect of the present invention, a video signalprocessing apparatus includes: a neighboring partition motion vectorselector for selecting a neighboring partition motion vector to beincluded in a motion vector prediction candidate group of the currentpartition; a motion vector scaler for scaling the selected neighboringpartition motion vector when a reference picture of the neighboringpartition is different from a reference picture of the currentpartition; a motion vector prediction value acquisition unit foracquiring a motion vector prediction value of the current partitionusing the motion vector prediction candidate group including the scaledmotion vector; and a motion vector acquisition unit for acquiring amotion vector of the current partition using the motion vectorprediction value.

MODE FOR INVENTION

Exemplary embodiments of the present invention will be described belowwith reference to the attached drawings. Prior to describing the presentinvention, it is to be noted that most terms disclosed in the presentinvention correspond to general terms well known in the art, but someterms have been selected by the applicant as necessary and willhereinafter be disclosed in the following description of the presentinvention. Therefore, it is preferable that the terms defined by theapplicant be understood on the basis of their meanings in the presentinvention.

In the specification, the following terms and even terms that are notdescribed may be interpreted based on the following standard. ‘Coding’may be interpreted as ‘encoding’ or ‘decoding’, and ‘information’ mayinclude values, parameters, coefficients, elements, etc. and may bedifferently interpreted according to circumstance. However, the presentinvention is not limited thereto. ‘Unit’ is used to designate a basicimage processing unit or a specific position in an image and may used beinterchangeably with the term ‘block’, ‘partition’ or ‘region’. Inaddition, in the specification, ‘unit’ may signify ‘coding unit’,‘prediction unit’, ‘transform unit’.

FIG. 1 is a block diagram of a video signal encoder 100 according to anembodiment of the present invention. Referring to FIG. 1, the videosignal encoder 100 includes a transformer 110, a quantizer 115, aninverse quantizer 120, an inverse transformer 125, a filtering unit 130,a prediction unit 150, and an entropy coding unit 160.

The transformer 110 may convert pixel values of a video signal inputthereto to acquire transform coefficients. For example, the transformer110 can use discrete cosine transform (DCT) or wavelet transform. DCTsegments the input video signal into blocks having a predetermined sizeand transforms the blocks. Coding efficiency may depend on adistribution and characteristics of values in a transform area.

The quantizer 115 quantizes the transform coefficients output from thetransformer 110. The inverse quantizer 120 inversely quantizes thetransform coefficients and the inverse transformer 125 restores pixelvalues using the inversely quantized transform coefficients.

The filtering unit 130 performs filtering to improve the quality of arestored image. For example, the filtering unit 130 can include adeblocking filter and an adaptive loop filter. The filtered image isoutput or stored in a memory 156 to be used as a reference picture.

To improve coding efficiency, a method of predicting an image using apreviously coded region and adding a residual value between thepredicted image and an original image to the predicted image to acquirea restored image is used instead of a method of directly coding a videosignal. An intra predictor 152 performs intra prediction of the currentimage and an inter predictor 154 predicts the current image using areference picture stored in the memory 156. The intra predictor 152performs intra prediction from restored regions in the current image andtransmits intra coding information to the entropy coding unit 160. Theinter predictor 154 may include a motion compensator 162 and a motionestimator 164. The motion estimator 164 acquires a motion vector of thecurrent region with reference to a restored region. The motion estimator164 transmits position information (a reference picture, motion vector,etc.) on a reference region to the entropy coding unit 160 such that theposition information can be included in a bitstream. The motioncompensator 162 performs inter motion compensation using the motionvector value transmitted from the motion estimator 164.

The entropy coding unit 160 entropy-codes the quantized transformcoefficients, inter coding information, the intra coding information,and reference region information input from the inter predictor 154 togenerate a video signal bitstream. The entropy coding unit 160 may usevariable length coding (VLC) and arithmetic coding. VLC converts inputsymbols into consecutive codewords. Here, the codewords may have avariable length. For example, frequently generated symbols arerepresented as short codewords whereas symbols that are not frequentlygenerated are represented as long codewords. Context-based adaptivevariable length coding (CAVLC) may be used as a VLC scheme. Arithmeticcoding converts consecutive symbols into one prime number. It ispossible to obtain an optimized prime number of bits necessary torepresent each symbol according to arithmetic coding. Context-basedadaptive binary arithmetic coding (CABAC) may be used as an arithmeticcoding scheme.

FIG. 2 is a block diagram of a video signal decoder 200 according to anembodiment of the present invention. Referring to FIG. 2, the videosignal decoder 200 includes an entropy decoding unit 210, an inversequantizer 220, an inverse transformer 225, a filtering unit 230, and aprediction unit 250.

The entropy decoding unit 210 decodes a video signal bitstream inputthereto to extract a transform coefficient and a motion vector withrespect to each region. The inverse quantizer 220 inversely quantizesthe entropy-decoded transform coefficient and the inverse transformer225 restores a pixel value using the inversely quantized transformcoefficient.

The filtering unit 230 filters an image to improve image quality. Thefiltering unit 230 may include a deblocking filter for reducing blockdistortion and/or an adaptive loop filter for eliminating imagedistortion. The filtered image is output or stored in a frame memory 256to be used as a reference image.

The prediction unit 250 includes an intra predictor 252 and an interpredictor 254 and restores a prediction image using information such ascoding type, the transform coefficient and motion vector with respect toeach region, decoded by the entropy decoding unit 210.

To this end, the intra predictor 252 performs intra prediction fromdecoded samples in the current image.

The inter predictor 254 estimates a motion vector using a referenceimage stored in the frame memory 256 and generates the prediction image.The inter predictor 254 includes a motion compensator 262 and a motionestimator 264. The motion estimator 264 acquires a motion vector whichrepresents the relationship between the current block and a referenceblock of a reference frame and delivers the motion vector to the motioncompensator 262.

A prediction value output from the intra predictor 252 or the interpredictor 254 and the pixel value output from the inverse transformer225 are summed to generate a restored video frame.

A description will be given of a method of segmenting a coding unit anda prediction unit in operations of the video signal encoder and videosignal decoder with reference to FIGS. 3 to 5.

The coding unit is a basic unit for processing an image in theaforementioned video signal processing operation (e.g., in intra/interprediction, transform, quantization and/or entropy coding). The size ofthe coding unit used to code an image need not be fixed. The coding unitmay have a rectangular form and one coding unit may be segmented intomultiple coding units.

FIG. 3 illustrates an example of segmenting a coding unit according toan embodiment of the present invention. For example, a coding unithaving a size of 2N—2N can be segmented into four N×N coding units.Coding unit segmentation may be performed recursively. It is notnecessary to segment all coding units into units having the same form.However, a maximum size 310 or a minimum size 320 of a coding unit maybe limited for facilitation of coding and processing operations.

Information representing whether a coding unit is segmented may bestored for the coding unit. For example, it is assumed that one codingunit can be segmented into four square coding units, as shown in FIG. 3.FIG. 4 illustrates a method of representing the coding unit segmentationstructure of FIG. 3 in a hierarchical manner using 0 and 1 according toan embodiment of the present invention. The information representingwhether the coding unit is segmented may be set to ‘1’ when the codingunit is segmented and set to ‘0’ when the coding unit is not segmented.As shown in FIG. 4, when a flag value indicating whether the coding unitis segmented is ‘1’, a block corresponding to the node is divided intofour blocks. When the flag value is ‘0’, the corresponding coding unitcan be processed without segmenting a block corresponding to the node.

It is not necessary for a block to be segmented into four square blocks.A code corresponding to a predetermined segmentation method may bemapped to segmentation information. For example, a corresponding blockcan be divided into two horizontal rectangular sub-blocks when asegmentation information value is 1, the block can be segmented into twovertical rectangular sub-blocks when the information value is 2, and theblock can be segmented into four square sub-blocks when the informationvalue is 3. This method is exemplary and does not limit the presentinvention.

The aforementioned coding unit structure may be represented using arecursive tree structure. Specifically, one picture or a coding unithaving a maximum size becomes a root and a coding unit segmented intosub coding units has as many child nodes as the number of the sub codingunits. A coding unit which is not segmented any more becomes a leafnode. If a coding unit can be segmented into only square units, thecoding unit can be divided into a maximum of four sub coding units, andthus a tree representing the coding unit can be a quad tree.

The encoder selects an optimum coding unit size according tocharacteristics (e.g. resolution) of a video or in consideration ofcoding efficiency, and information about the optimum coding unit size orinformation from which the optimum coding unit size can be derived canbe included in a bitstream. For example, a maximum coding unit size anda maximum depth of a tree can be defined. In the case of squaresegmentation, since the height and width of a coding unit correspond tohalf the height and width of a parent node, a minimum coding unit sizecan be acquired using the above-mentioned information. Conversely, aminimum coding unit size and a maximum depth of a tree can bepredefined, and the maximum coding size can be derived using the minimumcoding unit size and the maximum depth as necessary. Since the codingunit size is a multiple of 2 in the case of square segmentation, theactual coding unit size can be represented as a log value having 2 asthe base so as to improve transmission efficiency.

The decoder can acquire information representing whether the currentcoding unit is segmented. If this information is acquired (transmitted)only under a specific condition, efficiency can be improved. Forexample, the current coding unit can be segmented when the currentcoding unit at a specific position within a picture is included in thepicture and the size of the current coding unit is larger than apredetermined minimum coding unit, and thus it is possible to acquirethe information representing whether the current coding unit issegmented only in this case.

If the information represents that the current coding unit is segmented,the size of a segmented coding unit corresponds to half of the size ofthe current coding unit, and the current coding unit is segmented intofour square coding units on the basis of the current processingposition. The above-mentioned processing can be repeated on thesegmented coding units.

Picture prediction (motion compensation) for coding is performed on acoding unit (that is, a leaf node of a coding unit tree) which is notsegmented any more. A basic unit on which picture prediction isperformed is referred to as a prediction unit or a prediction block. Theprediction unit may be segmented into sub-prediction units in variousforms including a symmetrical form such as a square and a rectangle, anasymmetrical form, and a geometric form. For example, one predictionunit can be segmented into 2N×2N, 2N×N and N×2N sub-prediction units, asshown in FIG. 5. A bitstream may include information representingwhether the prediction unit is segmented or information about thesegmentation form of the prediction unit. This information may bederived from other information. The term ‘partition’ described in thespecification may be used to replace the prediction unit orsub-prediction unit. However, the present invention is not limitedthereto.

To restore the current unit on which decoding is performed, the currentpicture including the current unit or decoded parts of other picturesmay be used. A picture (slice) that uses only the current picture forrestoration, that is, performs only inter prediction is referred to asan intra picture or I-picture (slice), a picture (slice) that uses onemotion vector and reference index to predict each unit is referred to asa predictive picture or P-picture (slice), and a picture (slice) thatuses a maximum of two motion vectors and reference indexes is referredto as a bi-predictive picture or B-picture (slice).

The intra predictor performs intra prediction that predicts pixel valuesof a target unit from restored regions in the current picture. Forexample, the intra predictor can predict pixel values of the currentunit from pixels of units located at the top, left, top left and/or topright of the current unit.

The intra mode can include a vertical mode, a horizontal mode, a DC modeand an angular mode according to direction and prediction scheme of areference region in which reference pixels used for pixel valueprediction are located. The vertical mode uses a value of a verticalneighboring region of a target unit as a prediction value of the currentunit, whereas the horizontal mode uses a horizontal neighboring regionof the target unit as a reference region. The DC mode uses the averageof reference regions. The angular mode is used when a reference regionis located in an arbitrary direction. In the angular mode, the directioncan be indicated by an angle between the current pixel and a referencepixel. For convenience, predetermined angles and prediction mode numbersmay be used and the number of angles may depend on the size of a targetunit.

Several specific modes may be defined and used for the aforementionedprediction methods. While the prediction mode may be transmitted as avalue indicating the prediction mode, a method of predicting aprediction mode value of the current block can be used in order toimprove transmission efficiency. Here, the decoder can acquire theprediction mode of the current block using information which representswhether a prediction value for the prediction mode is used without beingchange and information which indicates a difference between theprediction value and the actual value.

The inter predictor performs inter prediction that predicts pixel valuesof a target unit using information about restored pictures other thanthe current picture. A picture used for prediction is referred to as areference picture. A reference region used to predict the current unitcan be represented using an index indicating a reference picture and amotion vector.

Inter prediction includes forward prediction, backward prediction andbi-directional prediction. Forward prediction uses one reference picturedisplayed (or output) prior to the current picture, whereas backwardprediction uses one reference picture displayed (or output) after thecurrent picture. For backward prediction, one piece of motioninformation (e.g. a motion vector and a reference picture index) may beneeded. Bi-directional prediction can use a maximum of two referenceregions. These two reference regions may be included in the samereference picture or respectively included in different referencepictures. That is, bi-directional prediction can use a maximum of twopieces of motion information (e.g. motion vectors and reference pictureindexes) and two motion vectors may have the same reference pictureindex or respectively have different reference picture indexes. Here,the reference pictures can be displayed (or output) before and after thecurrent picture.

A prediction unit coded in the inter mode may be segmented intopartitions in an arbitrary form (e.g. a symmetrical form, asymmetricalform or geometrical form). Each partition can be predicted from one ortwo reference pictures as described above.

Motion information of the current prediction unit may include motionvector information and a reference picture index. The motion vectorinformation may include a motion vector, a motion vector predictionvalue or a differential motion vector and may represent indexinformation that specifies the motion vector prediction value. The indexinformation that specifies the motion vector prediction value designatesa motion vector to be used as a motion vector prediction value of thecurrent partition in motion vector competition which will be describedbelow, from among a plurality of motion vectors included in a motionvector prediction candidate group. It is possible to directly designatethe motion vector to be used to predict the motion vector of the currentpartition from among the motion vector prediction candidate group bytransmitting the index information. Otherwise, an indirect method ofusing one of motion vectors included in the motion vector predictioncandidate group according to predetermined priority may be used withouttransmitting the index information. The differential motion vectorrepresents a difference between the motion vector and the motion vectorprediction value.

It is possible to acquire a reference unit of the current predictionunit using a motion vector and a reference picture index. The referenceunit is present in a reference picture having the reference pictureindex. A pixel value or interpolated value of a unit specified by themotion vector may be used as a prediction value of the currentprediction unit. That is, motion compensation that predicts the currentprediction unit from a previously decoded picture using motioninformation is performed.

For the current picture, a reference picture list can be generated usingpictures used for inter prediction. In the case of B-picture, tworeference picture lists, which are referred to as reference picture list0 (or List 0) and reference picture list 1 (or List 1) in the followingdescription, are needed.

In order to reduce transmission traffic related to motion vectors, it ispossible to employ a method of acquiring a motion vector predictionvalue using motion information about previously coded units andtransmitting only a motion vector difference with respect to the motionvector prediction value. The decoder obtains a motion vector predictionvalue of the current unit using motion information about other decodedunits and acquires a motion vector of the current unit using a motionvector difference transmitted thereto.

Referring to FIG. 6, for example, if a partition located on the left ofthe current prediction unit (partition) is neighboring partition A, apartition located at the top of the current prediction unit isneighboring partition B, a partition located at the top right of thecurrent prediction unit is neighboring partition C, and motion vectorsof neighboring partitions A, B and C are respectively MV_a, MV_b andMV_c, a motion vector prediction value MVp of the current partition canbe derived from the median of horizontal and vertical components ofMV_a, MV_b and MV_c. If decoding information about the neighboringpartition C cannot be obtained, the neighboring partition D located atthe top left of the current partition and the motion vector MV_d thereofcan replace the decoding information about the neighboring partition C.

If the motion vector of a neighboring partition is used to obtain themotion vector prediction value MVp of the current partition even whenthe reference picture of the neighboring partition is different from thereference picture of the current partition, accurate motion vectorprediction is limited. Accordingly, the present invention uses a methodof scaling a neighboring partition motion vector to perform moreaccurate motion vector prediction.

Motion vector scaling is a technique of linearly interpolating a motionvector using a temporal distance between the current picture and areference picture of each partition (current partition and neighboringpartitions). That is, motion vector scaling linearly interpolates amotion vector of a neighboring partition using the ratio of a temporaldistance between the current picture and a reference picture of theneighboring partition to a temporal distance between the current pictureand a reference picture of the current partition.

More specifically, a scaled motion vector MV′x can be obtained by thefollowing equation 1.

MV′x={(f _(ME) −f ₀)/(f _(x) −f _(c))}×MVx   [Equation 1]

Here, MVx denotes one of the motion vectors MV_a, MV_b, MV_c and MV_d ofthe neighboring partitions and MV′x denotes a scaled value of MVx. Inaddition, fx indicates the number of the reference picture of thecorresponding neighboring partition, f_(ME) represents the number of thereference picture of the current partition, and fc denotes the number ofthe current picture. The motion vector of a neighboring partition can bedown-scaled or up-scaled through linear interpolation such that themotion vector corresponds to the reference picture of the currentpartition, and error caused by a reference picture difference betweenpartitions can be reduced.

According to an embodiment of the present invention, motion vectorscaling through calculation of integers can be performed. Referring toFIGS. 7 and 8, a scaled value mvL0N scaled of a motion vector mvL0N of aneighboring partition can be obtained using the ratio (DistScaleFactor)of a temporal distance td between the reference picture of theneighboring partition and the current picture to a temporal distance tbbetween the reference picture of the current partition and the currentpicture, as expressed by the following equation.

mvL0N_scaled=(DistScaleFactor*mvL0N+128)>>8   [Equation 2]

Here, DistScaleFactor can be obtained by the following equation, asdefined in MPEG-4 AVC/H.264.

DistScaleFactor=Clip3(−1024,1023,(tb*tx+32)>>6)   [Equation 3]

Here, tx=(16384+Abs(td/2))/td.

The motion vector of the neighboring partition, which is selected formotion vector prediction of the current partition, can be converted intoa scaled value on the basis of the temporal distance ratio (tb/td) ofthe pictures. When the motion vector prediction direction of theselected neighboring partition is different from the motion vectorprediction direction of the current partition, the motion vector of theneighboring partition can be scaled in the reverse direction, as shownin FIG. 8.

The above-described motion vector scaling method can be used to improvethe accuracy of motion vector prediction of the current partition. Forexample, the motion vector prediction value MVp of the current partitioncan be obtained as follows using the motion vectors MV_a, MV_b, MV_c andMV_d of the neighboring partitions A, B, C and D as shown in FIG. 6.

When one of reference indexes refidx_a, refidx_b, refidx_c and refidx_dof the neighboring partitions A, B, C and D is identical to thereference index refidx of the current partition (e.g., when thereference index refidx_a is equal to the reference index refidx of thecurrent partition), one of i) the median of “MV_a”, “scaled value ofMV_b” and “scaled value of MV_c”, ii) the median of “MV_a”, “scaledvalue of MV_b”, “scaled value of MV_c” and “scaled value of “MV_d”, iii)the average of “MV_a” and “scaled value of MV_b (MV_b being the motionvector of the neighboring partition B having the reference index closestto the reference index of the current partition)”, and iv) “MV_a” can beacquired as the motion vector prediction value MVp of the currentpartition.

When two of the reference indexes refidx_a, refidx_b, refidx_c andrefidx_d of the neighboring partitions A, B, C and D are identical tothe reference index refidx of the current partition (e.g., when thereference indexes refidx_a and refidx_b are equal to the reference indexrefidx of the current partition), one of i) the median of “MV_a”, “MV_b”and “scaled value of MV_c”, ii) the median of “MV_a”, “MV_b”, “scaledvalue of MV_c” and “scaled value of “MV_d”, iii) the average of “MV_a”and “MV_b”, and iv) “MV_a (or MV_b)” can be acquired as the motionvector prediction value MVp of the current partition.

When three of the reference indexes refidx_a, refidx_b, refidx_c andrefidx d of the neighboring partitions A, B, C and D are identical tothe reference index refidx of the current partition (e.g., when thereference indexes refidx_a, refidx_b and refidx_c are equal to thereference index refidx of the current partition), one of i) the medianof “MV_a”, “MV_b” and “MV_c”, ii) the median of “MV_a”, “MV_b”, “MV_c”and “scaled value of “MV_d”, iii) the average of “MV_a”, “MV_b” and“MV_c”, and iv) “MV_a (or MV_b or MV_c)” can be acquired as the motionvector prediction value MVp of the current partition.

When any of the reference indexes refidx_a, refidx_b, refidx_c andrefidx_d of the neighboring partitions A, B, C and D is not identical tothe reference index refidx of the current partition, one of i) themedian of “scaled value of MV_a”, “scaled value of MV_b” and “scaledvalue of MV_c”, ii) the median of “scaled value of MV_a”, “scaled valueof MV_b”, “scaled value MV_c” and “scaled value of “MV_d”, and iii) themedian of “scaled value of MV_a”, “scaled value of “MV_b” and “scaledvalue of “MV_d” can be acquired as the motion vector prediction valueMVp of the current partition.

The above-mentioned method of obtaining the motion vector predictionvalue MVp of the current partition using the median or average of themotion vectors (or scaled motion vectors) of the neighboring partitionsis exemplary and the present invention is not limited thereto. That is,while the four neighboring partitions (left, top, top left and top rightpartitions) of the current partition can be used as described above,three neighboring partitions (left, top and top right partitions) mayalso be used.

Furthermore, the aforementioned motion vector scaling method can beperformed on a temporal neighboring partition of the current partitionas well as a spatial neighboring partition thereof to predict the motionvector of the current partition. The spatial neighboring partition ofthe current partition is a partition located at the left or top of thecurrent partition in the same picture (or slice) as that of the currentpartition. The temporal neighboring partition of the current partitionis located in the position corresponding to the current partition in apicture different from the picture corresponding to the currentpartition, such as a co-located partition of the current partition.According to an embodiment of the present invention, it is possible toobtain the motion vector prediction value of the current partition usingthe motion vectors of the temporal neighboring partition as well as themotion vector of the spatial neighboring partition, which will bedescribed in detail below.

According to the present invention, as described above, when motionvector prediction is performed using a motion vector of a neighboringpartition having a reference index (or reference picture) different fromthat of the current partition, it is possible to improve the accuracy ofmotion vector prediction by scaling the motion vector of the neighboringpartition.

According to an embodiment of the present invention, it is possible touse a motion vector of a neighboring partition having a referencepicture list different from that of the current partition as well as amotion vector of a neighboring partition having the same referencepicture list and the same reference index as those of the currentpartition, for motion vector prediction of the current partition.

As described above, a B-slice that performs bi-directional predictionhas two reference picture lists: reference picture list 0 (List 0) andreference picture list 1 (List 1). Prediction using List 0 is referredto as L0 prediction and prediction using List 1 is referred to as L1prediction. Referring to FIG. 9, the B-slice may indicate the samereference picture from different reference picture lists. This situationcan occur in a low-delay environment in which only a previous picture isreferred to. In FIG. 9, picture n−1 corresponds to the first referencepicture of List 1 while being the 0-th reference picture of List 0, andpicture n−2 corresponds to the 0-th reference picture of List 1 whilebeing the first reference picture of List 0.

Accordingly, the present invention can use a motion vector of aneighboring partition that refers to the same reference picture as thatof the current partition for motion vector prediction of the currentpartition even though the current partition and the neighboringpartition use different reference picture lists. Here, whether apartition refers to the same reference picture from different referencepicture lists can be determined on the basis of picture order count(POC).

POC represents a number assigned to the picture in temporal order.Accordingly, reference pictures having POCs smaller than the POC of atarget coding picture are past pictures, whereas reference pictureshaving POCs larger than the POC of the target coding picture are futurepictures.

FIGS. 10 and 11 show exemplary neighboring partitions having the samereference picture as that of the current partition and reference picturelists different from that of the current partition. In FIGS. 10 and 11,predFlagL0 and predFlagL1 are list flag values that indicate whether acorresponding partition refers to reference picture lists List0 andList1. When a list flag value is 1, the corresponding partition refersto the corresponding reference picture list. When the list flag value is0, the corresponding partition does not refer to the correspondingreference picture list. refIdxL0 and refIdxL1 are reference index valuesin corresponding lists when the list flag values predFlagL0 andpredFlagL1 corresponding thereto are 1. The reference index value is setto −1 when a list flag value corresponding thereto is 0, that is, thecorresponding reference picture list is not referred to.

Referring to FIG. 10, the current partition Cur has a value predFlagL0of 1 which indicates L0 prediction and a value refIdxL0 of 0, and thus amotion vector of the current partition Cur can be predicted using motionvectors of neighboring partitions A and C which have the same list flagvalue predFlagL0 of 1 (the same reference picture list) and the samereference index reldxL0 of 0 as those of the current partition Cur. Thepartition B has a value predFlagL0 of 0 which is different from that ofthe current partition, a value predFlagL1 of 1 indicating L1 prediction,and a value refIdxL1 of 1. A POC of a picture corresponding to thereference index ref_idx, 1, of List1 is 4 which equal the POC of thepicture corresponding to the reference index of 0 of List0, which isreferred to by the current partition. This represents that the partitionB and the current partition refer to the same reference picture. Thepresent invention can use the motion vector of a partition that refersto the same reference picture (the same POC) as that of the currentpartition for motion vector prediction of the current partition even ifthe reference picture is from different reference picture lists.Accordingly, in FIG. 10, the motion vector prediction value of thecurrent partition can be acquired using the median of the motion vectorof the partition A in the L0 direction, the motion vector of thepartition B in the L1 direction and the motion vector of the partition Cin the L0 direction.

Referring to FIG. 11, the current partition Cur has a value predFlagL0of 1 that indicates L0 prediction, the partitions B and C have valuespredFlagL0 and predFlagL1 of 0 that indicates intra prediction, and thepartition A has a value predFlagL1 of 1 that indicates L1 prediction.The POC value, 4, of the picture corresponding to the reference indexref_idx, 0, of List0 referred to by the current partition equals to thePOC value of the picture corresponding to the reference index ref_idx,1, of List1 referred to by the partition A. This represents that thepartition A and the current partition refer to the same referencepicture. Accordingly, the present invention can use the motion vector ofthe partition A in L1 direction for motion vector prediction of thecurrent partition.

As described above, the embodiments of the present invention can selecta motion vector of an inter mode partition which has the same POC asthat of the current partition, that is, the same reference picture asthat of the current partition even if the reference picture is fromdifferent reference picture lists in addition to a motion vector of aninter mode partition having the same reference index of the samereference picture list as those of the current partition amongneighboring partitions and use the motion vectors for motion vectorprediction of the current partition.

The technique of predicting the motion vector of the current partitionmay be extended to an advanced motion vector prediction (AMVP) techniquethat collects a motion vector prediction candidate group from spatialand temporal neighboring partitions of the current partition andacquires the motion vector prediction value of the current partition. Toselect the best motion vector from motion vector candidates included inthe motion vector prediction candidate group to use the best motionvector as a motion vector prediction value is referred to as motionvector competition.

Referring to FIG. 12, the motion estimator 264 of the video signaldecoder according to the present invention may include a neighboringpartition motion vector selector 282 that selects a neighboringpartition motion vector to be included in a motion vector predictioncandidate group of the current partition, a motion vector scaler 284that scales the selected neighboring partition motion vector when areference picture of the neighboring partition is different from that ofthe current partition, a motion vector prediction value acquisition unit286 that acquires a motion vector prediction value of the currentpartition using the motion vector prediction candidate group includingthe scaled neighboring partition motion vector, and a motion vectoracquisition unit 288 that acquires a motion vector of the currentpartition using the motion vector prediction value. The neighboringpartition motion vector selector 282 can collect motion vectorcandidates from spatial and temporal neighboring partitions of thecurrent partition. The motion vector acquisition unit 288 can calculatethe motion vector of the current partition by summing the motion vectorprediction value obtained through the motion vector prediction valueacquisition unit 286 and a differential motion vector.

The motion estimator 164 of the video signal encoder according to thepresent invention may include a neighboring partition motion vectorselector, a motion vector scaler, a motion vector prediction valueacquisition unit, and a motion vector acquisition unit, which have thesame functions as those of the aforementioned motion estimator 264 ofthe video signal decoder according to the present invention.

Referring to FIG. 13, the motion vector prediction candidate group ofthe current partition may include a motion vector a′ selected from aleft group corresponding to a group of left neighboring partitions A₀,A₁, . . . , A_(nA) of the current partition, a motion vector b′ selectedfrom a top group corresponding to a group of top neighboring partitionsB₀, B₁, . . . , B_(nB) of the current partition, and a motion vector c′selected from a corner group corresponding to a group of partitions C, Dand E which are diagonally adjacent to the current partition.

The median of the motion vectors a′, b′ and c′ can be derived andincluded in the motion vector prediction candidate group. In this case,it is possible to use i) the median of the three motion vectors a′, b′and c′ when the motion vectors a′, b′ and c′ are all available, ii) themedian of two of the motion vectors a′, b′ and c′ by allocating 0 to theunavailable motion vector when only the two motion vectors areavailable, iii) an available motion vector when only one of the threemotion vectors is available, and iv) 0 when all three motion vectors areunavailable. The motion vectors a′, b′ and c′ are not included in themotion vector prediction candidate group when available values cannot beset therefor.

In addition to the motion vectors of the aforementioned spatialneighboring partitions, a motion vector of a temporal neighboringpartition may be included in the motion vector prediction candidategroup. In this case, the motion vector of the temporal neighboringpartition may be adaptively included in the motion vector predictioncandidate group. That is, temporal competition information thatrepresents whether the motion vector of the temporal neighboringpartition is used for motion vector competition can be additionallyused. Accordingly, when motion vector competition is used foracquisition of a motion vector prediction value of the currentprediction unit, it is possible to restrict use of the motion vector ofthe temporal neighboring partition as a motion vector predictioncandidate on the basis of the temporal competition information. Thetemporal competition information is subjected to motion vectorcompetition, and thus the temporal competition information can beacquired only when motion competition indication information indicatesthat motion vector competition is used.

The motion vectors a′, b′ and c′ to be included in the motion vectorprediction candidate group, shown in FIG. 13, may be selected from thegroups (left group, top group and corner group) of the spatialneighboring partitions of the current partition through various methods.

Partitions in each group can be sequentially searched from one directionto the other direction for inter mode partitions having the samereference picture list and the same reference index as those of thecurrent partition, and a motion vector of the first detected partitioncan be included in the motion vector prediction candidate group.

Alternatively, partitions in each group can be sequentially searchedfrom one direction to the other direction for partitions having theinter mode regardless of reference picture lists and reference indexes,and a motion vector of the first detected partition can be included inthe motion vector prediction candidate group. In this case, the motionvector selected from each group includes a value scaled according to theembodiment of the present invention.

Alternatively, a motion vector of a partition having the inter mode canbe selected only in the case in which an available motion vector cannotbe searched through reference picture lists and reference indexes foreach group. That is, i) partitions in each group can be sequentiallysearched from one direction to the other direction for inter modepartitions having the same reference picture list and the same referenceindex as those of the current partition, and a motion vector of thefirst detected partition can be included in the motion vector predictioncandidate group. If there is no available motion vector, ii) partitionsin each group can be sequentially searched from one direction to theother direction for partitions having the inter mode, a motion vector ofthe first detected partition can be selected, and a scaled value of themotion vector can be included in the motion vector prediction candidategroup.

Otherwise, it is possible to set the following motion vector predictioncandidate group selection conditions in order to select available motionvectors to be included in the motion vector prediction candidate groupfor each group. The motion vector prediction candidate group selectionconditions according to the present invention will now be described withreference to FIG. 16.

i) (Condition 1) It is checked whether a neighboring partition is aninter mode partition having the same reference picture list and the samereference picture as those of the current partition (S102). Here, intermode partitions having the same reference picture list and the samereference picture as those of the current partition are searched.

ii) When condition 1 is not satisfied, (condition 2) it is checkedwhether a neighboring partition is an inter mode partition having thesame reference picture as that of the current partition (S104). In thiscase, inter mode partitions having the same reference picture as that ofthe current partition while having a reference picture list differentfrom that of the current partition are searched.

iii) When conditions 1 and 2 are not satisfied, (condition 3) it ischecked whether a neighboring partition is an inter mode partitionhaving the same reference picture as that of the current partition(S106). In this case, inter mode partitions having the same referencepicture list as that of the current partition while having a referencepicture different from that of the current partition are searched.

iv) When conditions 1, 2 and 3 are not satisfied, (condition 4) it ischecked whether a neighboring partition is an inter mode partition(S108). In this case, inter mode partitions that do not meet conditions1, 2 and 3, that is, inter mode partitions having a reference picturelist and a reference picture different from those of the currentpartition, are searched.

To collect the motion vector prediction candidate group for motionvector prediction of the current partition, the present invention cancheck whether the partitions included in the aforementioned groups (leftgroup, top group and corner group) satisfy conditions 1 to 4 bysearching the partitions in a predetermined order. In this case, it ispossible to search the partitions of each group in various ordersaccording to an appropriate combination of the motion vector predictioncandidate group selection conditions and partition position order. Themotion vector of the first neighboring partition that satisfies theconditions during the search process can be selected and included in themotion vector prediction candidate group.

If a motion vector of a neighboring partition that satisfies conditions1 and 2 is selected (S110), the selected motion vector can be includedin the motion vector prediction candidate group since the motion vectorhas the same reference picture as that of the motion vector of thecurrent partition (S120). If a motion vector of a neighboring partitionthat satisfies conditions 3 and 4 is selected (S112), the selectedmotion vector can be scaled (S114) and included in the motion vectorprediction candidate group (S120). However, if there is no neighboringpartition motion vector that satisfies any of conditions 1 to 4, it isconsidered that an available neighboring partition motion vector is notpresent (S130).

A description will be given of examples of order of searchingneighboring partition motion vectors to be selected as the motion vectorprediction candidate group according to combinations of the motionvector prediction candidate group selection conditions and partitionposition order for neighboring partitions included in each group withreference to Tables 1 to 4. However, the present invention is notlimited to the following embodiments and the order of searchingneighboring partition motion vectors to be selected as the motion vectorprediction candidate group can be changed in various manners.

In the following embodiments, ‘condition first search’ means a processof sequentially searching partitions in a group, which satisfies one ofthe motion vector prediction candidate group selection conditions,according to order of positions of the partitions and then repeating thesame process for the next condition, and ‘partition position firstsearch’ means a process of sequentially checking whether a neighboringpartition satisfies the four motion vector prediction candidate groupselection conditions and then repeating the same process for the nextneighboring partition.

That is, ‘condition first search’ provides higher priority to the motionvector prediction candidate group selection conditions for partitions ineach group, whereas ‘partition position first search’ provides higherpriority to the order of positions of partitions in each group. Here,the partition position order is a predetermined order of neighboringpartitions from one direction to the other direction.

In Tables 1 to 4, partition 0, partition 1 and partition 2 arepartitions in the same group, which are arranged in position order.Partition 0 represents the first partition of the corresponding groupand partition 2 represents the last partition of the group. The numberof partitions included in a group need not be 3. In Tables 1 to 4,numerals represent search order numbers.

TABLE 1 Partition 0 Partition 1 Partition 2 Condition 1 1 2 3 Condition2 4 5 6 Condition 3 7 8 9 Condition 4 10 11 12

Referring to Table 1, condition first search can be performed onpartitions in each group. Specifically, partitions 0 to 2 aresequentially searched to locate partitions that satisfy condition 1, andthe motion vector of the first detected partition that satisfiescondition 1 is selected as a motion vector to be included in the motionvector prediction candidate group. If there is no partition thatsatisfies condition 1, the partitions 0 to 2 are searched in the samemanner for conditions 2, 3 and 4.

TABLE 2 Partition 0 Partition 1 Partition 2 Condition 1 1 5 9 Condition2 2 6 10 Condition 3 3 7 11 Condition 4 4 8 12

Referring to Table 2, partition position first search can be performedon partitions in each group. Specifically, it is sequentially checkedwhether partition 0 satisfies conditions 1 to 4 and, if partition 0satisfies any of conditions 1 to 4, the motion vector of partition 0 isselected as a motion vector to be included in the motion vectorprediction candidate group. When partition 0 does not satisfy any ofconditions 1 to 4, the same search process is sequentially performed onpartitions 1 and 2.

TABLE 3 Partition 0 Partition 1 Partition 2 Condition 1 1 2 3 Condition2 4 7 10 Condition 3 5 8 11 Condition 4 6 9 12

Referring to Table 3, a combination of condition first search andpartition position first search can be performed on partitions in eachgroup. Specifically, condition first search with respect to condition 1is performed on partitions 0, 1 and 2 to sequentially check whetherpartitions 0, 1 and 2 satisfy condition 1, and the motion vector of thefirst partition that satisfies condition 1 is selected as a motionvector to be included in the motion vector prediction candidate group.

If there is no partition that satisfies condition 1, partition positionfirst search is performed for the other conditions. Specifically, it issequentially checked whether partition 0 satisfies conditions 2, 3 and 4and, if partition 0 satisfies any of condition 2, 3 and 4, the motionvector of partition 0 is selected as a motion vector to be included inthe motion vector prediction candidate group. If partition 0 does notsatisfy any of conditions 2, 3 and 4, the same search process isperformed on partition 1. Accordingly, in the example of Table 3,condition first search is performed using condition 1 as the toppriority condition and, when there is no partition that satisfiescondition 1, partition position first search is carried out on the otherconditions.

TABLE 4 Partition 0 Partition 1 Partition 2 Condition 1 1 5 6 Condition2 2 7 8 Condition 3 3 9 10 Condition 4 4 11 12

Referring to Table 4, a combination of condition first search andpartition position first search may be performed on partitions in eachgroup. Specifically, partition position first search is performed onpartition 0 to sequentially check whether partition 0 satisfiesconditions 1 to 4 and, if partition 0 satisfies any of conditions 1 to4, the motion vector of partition 0 is selected as a motion vector to beincluded in the motion vector prediction candidate group.

If partition 0 does not satisfy any of conditions 1 to 4, conditionfirst search is performed on the remaining partitions. Specifically, itis sequentially checked whether partitions 1 and 2 meet condition 1 andthe motion vector of the first partition that satisfies condition 1 isselected as a motion vector to be included in the motion vectorprediction candidate group. If any of partitions 1 and 2 does notsatisfy condition 1, the same search process is performed for condition2. That is, in the example of Table 4, the search process is performedusing partition 0 as top priority search condition and, when partition 0does not meet any of conditions 1 to 4, condition first search iscarried out on the remaining partitions.

The motion vectors a′, b′ and c′ selected by the above-mentioned methodsproposed by the present invention affects i) the median of the motionvectors a′, b′ and c′ and ii) an increase in the number of motionvectors included in the motion vector prediction candidate group. Thatis, a neighboring partition motion vector, which is not included in themotion vector prediction candidate group because it is not available,may become available according to motion vector scaling of the presentinvention and may be included in the motion vector prediction candidategroup.

The above two factors are independent of each other and it is possibleto determine whether or not motion vector scaling is applied to eachfactor. For example, if motion vector scaling is applied only to themedian of the motion vectors, only the median is changed while thenumber of motion vector candidates is maintained. If motion vectorscaling is applied to increase the number of motion vector candidates,the median equals the value in AMVP but the number of motion vectorcandidates increases. It is also possible to apply motion vector scalingto both factors.

According to the embodiments of the present invention, the range ofselection of neighboring partition motion vectors to be included in themotion vector prediction candidate group may be narrowed, as shown inFIG. 14. That is, a bottom left neighboring partition A_(m+1) of thecurrent partition and the lowest partition A_(m) among left neighboringpartitions of the current partition may form a first group and a topright neighboring partition B_(n+1) of the current partition and therightmost partition B_(n) among top neighboring partitions of thecurrent partition may form a second group. The motion vector predictioncandidate group of the current partition may include the motion vectora′ selected from the first group and the motion vector b′ selected fromthe second group. In addition to the motion vectors of the spatialneighboring partitions, motion vectors of temporal neighboringpartitions can be included in the motion vector prediction candidategroup, as described above. When the number of spatial neighboringpartition motion vectors included in the motion vector predictioncandidate group is reduced in this manner, computation time andcomplexity required to select neighboring partition motion vectors canbe decreased.

A description will be given of the order of searching neighboringpartition motion vectors to be included in the motion vector predictioncandidate group according to combinations of the motion vectorprediction candidate group selection conditions and partition positionorder for the first and second groups which have a reduced number ofmotion vector candidates. In the following embodiments, definitions of‘motion vector prediction candidate group selection conditions’ and‘partition position order’ correspond to those in the examples of Tables1 to 4. The present invention is not limited to the followingembodiments and the search order can be changed in various manners. Inaddition, in the following embodiments, a motion vector of a selectedpartition is used when the partition satisfies condition 1 or 2 and ascaled motion vector of the partition is used when the partition meetscondition 3 or 4, as described above.

TABLE 5 A_(m) A_(m+1) Condition 1 1 5 Condition 2 2 6 Condition 3 3 7Condition 4 4 8

TABLE 6 A_(m) A_(m+1) Condition 1 5 1 Condition 2 6 2 Condition 3 7 3Condition 4 8 4

TABLE 7 B_(n+1) B_(n) B⁻¹ Condition 1 1 5 9 Condition 2 2 6 10 Condition3 3 7 11 Condition 4 4 8 12

Referring to Tables 5 to 7, partition position first search can beperformed on partitions in each group. As shown Table 5, it issequentially checked whether the partition A_(m) of the first groupsatisfies conditions 1 to 4 and the motion vector of the partition A_(m)is selected as a motion vector to be included in the motion vectorprediction candidate group if the partition A_(m) satisfies any ofconditions 1 to 4. If the partition A_(m) does not satisfy any ofconditions 1 to 4, the same search process is performed on the partitionA_(m+1).

Referring to Table 6, the partition search order is changed, the searchprocess is performed on the partition N_(m+1) first and, if thepartition A_(m+1) does not satisfy any of conditions 1 to 4, the searchprocess is performed on the partition A_(m). This partition positionfirst search can be performed on the partitions in the second group inthe same manner, as shown in Table 7.

TABLE 8 A_(m) A_(m+1) Condition 1 1 2 Condition 2 3 4 Condition 3 5 6Condition 4 7 8

TABLE 9 B_(n+1) B_(n) B⁻¹ Condition 1 1 2 3 Condition 2 4 5 6 Condition3 7 8 9 Condition 4 10 11 12

Referring to Tables 8 and 9, condition first search can be performed onpartitions in each group. That is, the partitions of the first andsecond groups are sequentially searched for partitions that satisfycondition 1 and the motion vector of the first partition that satisfiescondition 1 is selected as a motion vector to be included in the motionvector prediction candidate group. When there is no partition that meetscondition 1, the same search process can be performed on the partitionsof the first and second groups for conditions 2, 3 and 4.

TABLE 10 A_(m) A_(m+1) Condition 1 1 2 Condition 2 3 6 Condition 3 4 7Condition 4 5 8

TABLE 11 A_(m) A_(m+1) Condition 1 2 1 Condition 2 6 3 Condition 3 7 4Condition 4 8 5

TABLE 12 B_(n+1) B_(n) B⁻¹ Condition 1 1 2 3 Condition 2 4 7 10Condition 3 5 8 11 Condition 4 6 9 12

Referring to Tables 10, 11 and 12, a combination of condition firstsearch and partition position first search can be performed onpartitions in each group. Specifically, condition first search isperformed for condition 1 to sequentially search the partitions of thefirst and second groups according to partition position order forpartitions that satisfy condition 1, and the motion vector of the firstpartition that meets condition 1 is selected as a motion vector to beincluded in the motion vector prediction candidate group.

If there is no partition that satisfies condition 1, partition positionfirst search is performed for the other conditions. Specifically,referring to Table 10, it is sequentially checked whether the partitionA_(m) of the first group satisfies conditions 2, 3 and 4 and, when thepartition A_(m) satisfies any of conditions 2, 3 and 4, the motionvector of the partition A_(m) is selected as a motion vector to beincluded in the motion vector prediction candidate group. If thepartition A_(m) does not satisfy any of conditions 2, 3 and 4, the samesearch process is performed on the partition A_(m+1). The partitionsearch order for partition position first search may be changed, asshown in Table 11. The aforementioned search process can be performed onthe partitions of the second group in the same manner, as shown in Table12.

According to the examples of Tables 10 to 12, the search process isperformed using condition 1 as the top priority search condition and,when there is no partition that satisfies condition 1, partitionposition first search is performed on the other conditions.

TABLE 13 A_(m) A_(m+1) Condition 1 2 1 Condition 2 4 3 Condition 3 7 5Condition 4 8 6

TABLE 14 A_(m) A_(m+1) Condition 1 3 1 Condition 2 4 2 Condition 3 7 5Condition 4 8 6

TABLE 15 B_(n+1) B_(n) B⁻¹ Condition 1 1 2 3 Condition 2 4 5 6 Condition3 7 9 11 Condition 4 8 10 12

TABLE 16 B_(n+1) B_(n) B⁻¹ Condition 1 1 3 5 Condition 2 2 4 6 Condition3 7 9 11 Condition 4 8 10 12

Referring to Tables 13 to 16, a search process is performed onpartitions in each group for conditions 1 and 2 and, when an availablemotion vector cannot be selected through the search process forconditions 1 and 2, a search process for conditions 3 and 4 is carriedout on the partitions in each group. In this case, the search processfor conditions 1 and 2 and the search process for conditions 3 and 4 canuse any one of condition first search and partition position firstsearch. In the embodiments of the present invention, it is not necessaryto perform motion vector scaling on neighboring partitions that satisfyconditions 1 and 2 because the neighboring partitions refer to the samereference picture as that of the current partition. The motion vectorsof the neighboring partitions that do not require motion vector scalingcan be searched preferentially so as to reduce the frequency andcomplexity of the motion vector scaling process.

Furthermore, the present invention can omit search of some partitions inorder to reduce complexity by decreasing the number of search cases. Forexample, only the first to fifth partitions of the first group can besearched by omitting search of the sixth, seventh and eighth partitions.Otherwise, search of the sixth, seventh, eighth, tenth, eleventh andtwelfth partitions of the second group can be omitted in the case ofTable 7, and search of the fifth, sixth, eighth, ninth, eleventh andtwelfth partitions of the second group can be omitted in the case ofTable 9. That is, it is possible to combine condition first search forone of the motion vector prediction candidate group selection conditionsand position first search for one partition in each group.

To reduce the quantity of transmission information related to interprediction, the merge mode, skip mode or prediction mode which will bedescribed below may be used

Referring to FIG. 15, in the merge mode, a partition can be merged withvertical, horizontal or diagonal neighboring partitions A, B, C or D.Here, merging serves to acquire prediction information for inter pictureprediction of the current partition from inter prediction information ofa neighboring partition. Partition merging can be represented usinginformation indicating whether a corresponding partition is merged(e.g., merge_flag), information indicating which partition (e.g., thetop partition A among left neighboring partitions, the leftmostpartition B among top neighboring partitions, the top right neighboringpartition C or the bottom left neighboring partition D) is merged, etc.This information indicating which partition is merged can be acquiredonly when merging of the current partition is indicated (merge_flag=1).

In the merge mode, motion information of the current partition can beacquired using motion information of four or fewer spatial neighboringpartitions and motion information of one temporal neighboring partitionas the information indicating which partition is merged.

The skip mode uses motion information of a previously coded partition asmotion information about the current partition when the currentpartition is restored. Accordingly, information other than informationindicating a to-be-skipped partition is not transmitted in the skipmode. In this case, motion information necessary for prediction can bederived from neighboring partition motion vectors.

In the skip mode, pixel values of a reference region in a previouslycoded reference picture can be used. The pixel values of the referenceregion may be accompanied by motion compensation using a motion vectorprediction value. However, the current partition may have motion vectorinformation when motion vector competition is used when the motionvector prediction value is acquired.

When the current partition is not coded in the skip mode, the currentpartition can be directly coded in the prediction mode. The directprediction mode predicts the motion information of the current partitionfrom motion information of a decoded partition. The direct predictionmode is distinguished from the skip mode in that the current partitionhas a residual.

According to the embodiments of the present invention, it is possible tounify methods of predicting motion information in all modes by applyingthe method of acquiring motion information of a neighboring partition,used in the merge mode, to the skip mode and the normal inter mode. Thatis, motion information of a spatial neighboring partition is used in theskip mode and normal inter mode as in the merge mode, instead ofperforming a search process in a predetermined order to obtain availablemotion information in the skip mode and normal inter mode. However,since the reference index or prediction direction of the currentpartition is known in the skip mode or normal inter mode, distinguishedfrom the merge mode, it is possible to use a motion vector of aneighboring partition as an available motion vector included in themotion vector prediction candidate group when the neighboring partitionhas the same reference picture as that of the current partition and toexclude the motion vector of the neighboring partition from the motionvector prediction candidate group by processing the motion vector as anunavailable motion vector when the reference picture of the neighboringpartition is different from the reference picture of the currentpartition. Alternatively, when the reference picture of the neighboringpartition is different from the reference picture of the currentpartition, it is possible to calculate a motion vector corresponding tothe motion information of the current partition using the motion vectorscaling method proposed by the present invention and use the calculatedmotion vector as a motion vector included in the motion vectorprediction candidate group.

To increase the accuracy of motion compensation, pixel accuracy of lessthan an integer number of pixels can be used. In this case, a pixelvalue smaller than an integer number of pixels is generated usinginterpolation of pixel values of a reference picture.

Which one of the inter prediction mode, direct prediction mode, interprediction mode and skip mode is used for prediction can be representedusing prediction mode information or a flag that indicates whether thecorresponding mode has been used. In a specific case, the correspondingmode can be derived using other information.

It may be possible to compress motion vectors and transmit thecompressed motion vectors to reduce motion vector transmissioninformation. For example, a median filter can be used for motion vectorsto be stored to obtain a compression value. To achieve this, informationrepresenting whether motion vector compression is used and informationabout a compression ratio can be additionally transmitted. Furthermore,it is possible to simply store the first top left motion vector, use themotion vector as a reference value, and transmit differences between thereference value and the other motion vectors so as to reduce computationcomplexity.

Meanwhile, transform (e.g., DCT) of an image is performed in a unitdifferent from the prediction unit. This unit is referred to as atransform unit in the following description. The transform unit normallyhas a square form for DCT and may be recursively segmented similarly tothe coding unit. The size of the transform unit may be set to the mostefficient size according to characteristics of the image and may besmaller or larger than the prediction unit. One prediction unit mayinclude a plurality of transform units in general.

The structure and size of the transform unit are similar to those of thecoding unit as described above. For example, one transform unit can berecursively segmented into four transform units in a quad tree form.Information about the structure of the transform unit may include amaximum height (or segmentation depth) of a predetermined transform unittree, a maximum size of the transform unit, a minimum size of thetransform unit, the difference between the maximum size and minimum sizeof the transform unit, and/or logs of these values, a depth of thetransform unit and a size of the transform unit, which are derived usingthe values, etc. The maximum segmentation depth of the transform unitmay depend on the prediction mode of the corresponding unit. The size ofthe coding unit may affect the size of the transform unit.

For the transform unit, it is possible to acquire informationrepresenting whether the current transform unit has been segmented. Forexample, when this information indicates that the correspondingtransform unit has been segmented, the corresponding transform unit canbe further recursively segmented into four transform units.

Embodiments described above are combinations of elements and features ofthe present invention. The elements or features may be consideredselective unless otherwise mentioned. Each element or feature may bepracticed without being combined with other elements or features.Further, an embodiment of the present invention may be constructed bycombining parts of the elements and/or features. Operation ordersdescribed in embodiments of the present invention may be rearranged.Some constructions of any one embodiment may be included in anotherembodiment and may be replaced with corresponding constructions ofanother embodiment.

The decoding/encoding methods to which the present invention is appliedmay be implemented as code that can be written on a computer-readablerecording medium and thus read by a processor. The computer-readablerecording medium may be any type of recording device in which data isstored in a computer-readable manner. Examples of the computer-readablerecording medium include a ROM, a RAM, a CD-ROM, a magnetic tape, afloppy disc, an optical data storage, and a carrier wave (e.g., datatransmission through the Internet). A bitstream generated according tothe encoding method can be stored in a computer readable recordingmedium or transmitted using a wired/wireless communication network.

The embodiments of the present invention may be implemented by variousmeans, for example, hardware, firmware, software, or combinationsthereof. When the embodiments of the present invention are implementedusing hardware, the embodiments may be implemented using at least one ofApplication Specific Integrated Circuits (ASICs), Digital SignalProcessors (DSPs), Digital Signal Processing Devices (DSPDs),Programmable Logic Devices (PLDs), Field Programmable Gate Arrays(FPGAs), processors, controllers, microcontrollers, microprocessors, andelectrical units devised to perform the present invention. In somecases, the embodiments of the present invention may be implemented ascontrollers.

In a software configuration, the embodiments of the present inventionmay be implemented as software modules. The software modules may executeone or more functions and operations described in the specification.Software code may be implemented as a software application written in anappropriate program language. The software code may be stored in amemory and executed by a controller.

Those skilled in the art will appreciate that the present invention maybe carried out in other specific ways than those set forth hereinwithout departing from the spirit and essential characteristics of thepresent invention. The above embodiments are therefore to be construedin all aspects as illustrative and not restrictive. The scope of theinvention should be determined by the appended claims and their legalequivalents, not by the above description, and all changes coming withinthe meaning and equivalency range of the appended claims are intended tobe embraced therein.

INDUSTRIAL APPLICABILITY

The present invention is applicable to video signal encoding anddecoding.

1. A video signal processing method comprising: selecting at least oneneighboring partition motion vector for motion vector prediction of thecurrent partition; scaling the selected neighboring partition motionvector when a reference picture of the neighboring partition motionvector is different from a reference picture of the current partition;acquiring a motion vector prediction value of the current partitionusing the scaled motion vector; and acquiring a motion vector of thecurrent partition using the motion vector prediction value.
 2. The videosignal processing method according to claim 1, wherein the scaled motionvector is a motion vector linearly interpolated using an inter picturetemporal distance.
 3. A video signal processing method comprising:selecting a neighboring partition motion vector to be include in amotion vector prediction candidate group of the current partition;scaling the selected neighboring partition motion vector when areference picture of the neighboring partition motion vector isdifferent from a reference picture of the current partition; acquiring amotion vector prediction value of the current partition using the motionvector prediction candidate group including the scaled motion vector;and acquiring a motion vector of the current partition using the motionvector prediction value.
 4. The video signal processing method accordingto claim 3, wherein the scaled motion vector is a motion vector linearlyinterpolated using an inter picture temporal distance.
 5. The videosignal processing method according to claim 3, wherein the motion vectorprediction candidate group includes motion vectors respectively selectedfrom a first group including a bottom left neighboring partition A_(m+1)of the current partition and the lowest partition A_(m) among leftneighboring partitions of the current partition, and a second groupincluding a top right neighboring partition B_(n+1) of the currentpartition, the rightmost partition B_(n) among top neighboringpartitions of the current partition, and a top left neighboringpartition B⁻¹ of the current partition.
 6. The video signal processingmethod according to claim 5, wherein the selecting the neighboringpartition motion vector comprises respectively selecting motion vectorsfrom the first group and the second group on the basis of referencepicture lists, reference pictures and motion vector prediction candidategroup selection conditions including information indicating an intermode.
 7. The video signal processing method according to claim 6,wherein the motion vector prediction candidate group selectionconditions sequentially determine; (a) whether a neighboring partitionis an inter mode partition having the same reference picture list andthe same reference picture as those of the current partition, (b)whether a neighboring partition is an inter mode partition having areference picture list different from that of the current partition andthe same reference picture as that of the current partition, (c) whethera neighboring partition is an inter mode partition having the samereference picture list as that of the current partition and a referencepicture different from that of the current partition, and (d) whether aneighboring partition is an inter mode partition.
 8. The video signalprocessing method according to claim 7, wherein whether a neighboringpartition is an inter mode partition having a reference picture listdifferent from that of the current partition and the same referencepicture as that of the current partition is determined on the basis of apicture order count (POC) value.
 9. The video signal processing methodaccording to claim 7, wherein the selecting the neighboring partitionmotion vector comprises performing condition first search, whichprioritizes the motion vector prediction candidate group selectionconditions higher than partition position order, on the partitions ofthe first or second group.
 10. The video signal processing methodaccording to claim 7, wherein the selecting the neighboring partitionmotion vector comprises performing partition position first search,which prioritizes partition position order higher than the motion vectorprediction candidate group selection conditions, on the partitions ofthe first or second group.
 11. The video signal processing methodaccording to claim 7, wherein the selecting the neighboring partitionmotion vector comprises: performing condition first search on thepartitions of the first or second group for the motion vector predictioncandidate group selection condition (a); and performing partitionposition first search for the motion vector prediction candidate groupselection conditions (b), (c) and (d) if an available neighboringpartition motion vector is not located through the condition firstsearch.
 12. A video signal processing apparatus comprising: aneighboring partition motion vector selector for selecting a neighboringpartition motion vector to be included in a motion vector predictioncandidate group of the current partition; a motion vector scaler forscaling the selected neighboring partition motion vector when areference picture of the neighboring partition motion vector isdifferent from a reference picture of the current partition; a motionvector prediction value acquisition unit for acquiring a motion vectorprediction value of the current partition using the motion vectorprediction candidate group including the scaled motion vector; and amotion vector acquisition unit for acquiring a motion vector of thecurrent partition using the motion vector prediction value.